import Vue from 'vue'
import Router from 'vue-router'
// import Homepage from '../views/Homepage.vue'
// import ParkingMonitor from '../views/ParkingMonitor.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: require('../views/ParkingMonitor.vue').default,
      children: [
        {
          path: '',
          name: 'allcamera',
          component: require('../components/ParkingMonitor/AllCamera.vue').default,
        },

        {
          path: 'parking_status',
          component: require('../components/ParkingMonitor/ParkingStatus.vue').default
        }
      ]
    },

    // 开始菜单
    {
      path: '/start',
      name: 'start',
      component: require('../views/StartMenu.vue').default,
      children: [
        {
          path: 'admin',
          component: require('../components/StartMenu/Adms.vue').default
        },
        {
          path: 'server_port',
          component: require('../components/StartMenu/ServerPort.vue').default
        }
      ]
    },

    // 收费
    {
      path: "/charge",
      component: require("../views/Charge.vue").default,
      children: [
        {
          path: 'timer',
          component: require("../components/Charge/Timer.vue").default
        },
        {
          path: 'setfee',
          component: require("../components/Charge/SetFee.vue").default
        },
        {
          path: 'history',
          component: require("../components/Charge/History.vue").default
        }
      ]
    },

    // 初始化车位信息
    // {
    //   path: "/inital_parking_part",
    //   component: require("../views/InitialParkingPart.vue").default,
    // },

    // 摄像头管理
    {
      path: "/camerastatus",
      name: 'camerastatus',
      component: require('../views/CameraStatus.vue').default,
      children: [
        {
          path: "all",
          component: require('../components/CameraStatus/CameraBase.vue').default
        },
        {
          path: "normal",
          component: require('../components/CameraStatus/CameraNormal.vue').default,
        },
        {
          path: "fault",
          component: require('../components/CameraStatus/CameraFault.vue').default,
        }
      ]
    },

    // 使用说明
    {
      path: '/usage',
      component: require('../components/Help/Help.vue').default
    }
  ]
})
